#ifndef RTAPI_STRING_H
#define RTAPI_STRING_H

#ifdef MODULE
/* Suspect only very early kernels are missing the basic string functions.
   To be sure, see what has been implemented by looking in linux/string.h
   and {linux_src_dir}/lib/string.c */
#include <linux/string.h>
#include <linux/version.h>
#define rtapi_argv_split argv_split
#define rtapi_argv_free argv_free
#define rtapi_kstrdup(a, b) kstrdup(a, b)
#else
#include <string.h>
#include <rtapi/rtapi.h>
#include <rtapi/rtapi_gfp.h>
RTAPI_BEGIN_DECLS
extern char** rtapi_argv_split(rtapi_gfp_t, const char* argstr, int* argc);
extern void rtapi_argv_free(char** argv);
#define rtapi_kstrdup(a, b) strdup(a)
RTAPI_END_DECLS
#endif

#endif
